package com.iu.service;

import com.iu.bean.UserBean;
import com.iu.dao.UserBeanMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserLoginService implements IUserLoginService {
    @Resource
    private  UserBeanMapper userBeanMapper;
    @Override
    public boolean doLogin(UserBean userBean) {
        boolean isOk = false;
        List<UserBean> userBeans= userBeanMapper.selectToLogin(userBean);
        if (userBeans !=null &&userBeans.size()>0) {
            //结果集存在且非空，登录成功
            isOk = true;
        }
        return isOk;
    }
}
